package com.example.jwt.demo.ex;

/**
 * @创建人 zwzheng
 * @创建时间 ${date}
 * @描述
 */
public class People implements FunctionInf {


    @Override
    public void dosomething() {
        eat();
        sleep();
    }

    @Override
    public void eat() {
        System.out.println("必吃的是:");
        System.out.println(geteatAnimal().isDelicious());
    }

    @Override
    public void sleep() {

    }


    public Animal geteatAnimal() {
        return new Animal() {
            @Override
            public String isDelicious() {
                return "鱼和猪都很好吃";
            }
        };
    }


}
